[SHARE-746][Improvement] Change ports for rabbitmq, postgres, and elasticsearch#629
Open
laurenbarker wants to merge 3 commits intoCenterForOpenScience:developfrom
Open
[SHARE-746][Improvement] Change ports for rabbitmq, postgres, and elasticsearch#629laurenbarker wants to merge 3 commits intoCenterForOpenScience:developfrom
laurenbarker wants to merge 3 commits intoCenterForOpenScience:developfrom
Conversation
chrisseto
suggested changes
Apr 20, 2017
docker-compose.yml
Outdated
| web: | ||
| build: . | ||
| command: python manage.py runserver --noreload 0.0.0.0:8000 | ||
| command: python manage.py runserver --noreload 0.0.0.0:38000 |
Member
There was a problem hiding this comment.
Does this work? You've told the server in the container to run on port 38000 but you're forwarding the host's port 8000 in the container still.
docker-compose.yml
Outdated
| BROKER_URL: amqp://guest:guest@rabbitmq:5672/ | ||
| SHARE_API_URL: http://web:8000/ | ||
| ELASTICSEARCH_URL: http://elasticsearch:9200/ | ||
| BROKER_URL: amqp://guest:guest@rabbitmq:35672/ |
Member
There was a problem hiding this comment.
Wouldn't this need to be kept as the default port? The actual connection should be happening inside the container.
manage.py
Outdated
| # Override default port for `runserver` command | ||
| django.setup() | ||
| from django.core.management.commands.runserver import Command as runserver | ||
| runserver.default_port = "38000" |
Member
There was a problem hiding this comment.
This feels very hacky. Could you overwrite the runserver command with your own and then just subclass it?
e3acb86 to
6191a3b
Compare
cc15ee1 to
4847a89
Compare
Contributor
Author
|
@aaxelb, conflicts resolved. The docs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Make it easier to have both SHARE and the OSF running locally.
Changes
Added 30,000 to all SHARE services ports:
5432-->354329200-->392005672-->356724200-->34200To run the server locally (not in docker):
python manage.py runlocalserverinstead ofpython manage.py runserver.To run the server locally (not in docker) would need to set a local env var to make'PORT': os.environ.get('DATABASE_PORT', '5432'),35432insettings.py. And runpython manage.py runlocalserverinstead ofpython manage.py runserver.Related PR: cos-archives/ember-share#191
This could be done in other ways:
Side effects
Need to make sure all environment variables are defined on staging/production.
Will require some changes to staging/production. Also changes to quay images.Could just have a separate docker-compose.yml for local though?Ticket
https://openscience.atlassian.net/browse/SHARE-746